home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr01 / jock.zip / TOTDEM11.ZIP / DEMST1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  1KB  |  41 lines

  1. program DemoStringOne;
  2. {demST1 - string functions}
  3.  
  4. Uses DOS, CRT,
  5.      totFAST, totSTR;
  6.  
  7. Var
  8.    DemoStr : string;
  9.  
  10. begin
  11.    ClrScr;
  12.    with Screen do
  13.    begin
  14.       DemoStr := '  TechnoJock''s Object Toolkit string demo   ';
  15.       WriteAt(5,1,lightgray,'Source String: ');
  16.       WriteAt(30,1,lightcyan,'"'+DemoStr+'"');
  17.       WriteAt(1,4,lightgray,'SetUpper:');
  18.       WriteAt(30,4,yellow,'"'+SetUpper(DemoStr)+'"');
  19.       WriteAt(1,5,lightgray,'SetLower:');
  20.       WriteAt(30,5,yellow,'"'+SetLower(DemoStr)+'"');
  21.       WriteAt(1,6,lightgray,'SetProper:');
  22.       WriteAt(30,6,yellow,'"'+SetProper(DemoStr)+'"');
  23.       WriteAt(1,7,lightgray,'Total words:');
  24.       WriteAt(30,7,lightgreen,IntToStr(WordCnt(DemoStr)));
  25.       WriteAt(1,8,lightgray,'Posn. Word 3:');
  26.       WriteAt(30,8,lightgreen,IntToStr(PosWord(3,DemoStr)));
  27.       WriteAt(1,9,lightgray,'Words 2..5 are:');
  28.       WriteAt(30,9,yellow,'"'+ExtractWords(2,4,DemoStr)+'"');
  29.       WriteAt(1,10,lightgray,'Strip Leading spaces:');
  30.       WriteAt(30,10,yellow,'"'+Strip('L',' ',DemoStr)+'"');
  31.       WriteAt(1,11,lightgray,'Strip Trailing spaces:');
  32.       WriteAt(30,11,yellow,'"'+Strip('R',' ',DemoStr)+'"');
  33.       WriteAt(1,12,lightgray,'Strip Lng. & Tng. spaces:');
  34.       WriteAt(30,12,yellow,'"'+Strip('B',' ',DemoStr)+'"');
  35.       WriteAt(1,13,lightgray,'Strip All spaces:');
  36.       WriteAt(30,13,yellow,'"'+Strip('A',' ',DemoStr)+'"');
  37.    end;
  38.    GotoXY(1,23);
  39. end.
  40.  
  41.